package org.zhs.decorate.demo2;

/**
 * Author: zhs
 * Date: 16/05/2024 17:05
 * Description:
 * 该对象是需要被增强的对象
 */
public class StringDataSource implements DataSource{

    private String data;

    @Override
    public void writeData(String data) {
        this.data = data;
        System.out.println("被增强的类：writeData： " + data);
    }

    @Override
    public String readData() {
        return data;
    }
}
